#ifndef datumhandler_H
#define datumhandler_H

#include "geometry.h"

namespace ABAN
{


    //Definations of DatumContainer whitch will keep related data for each cell
    template <class T> class DatumContainer : public std::vector<T>
    {
        //IMPORTANT NOTE
        //METHODS OF THIS CLASS MUST BE CORRECTED FOR RE-NUMBERING ALGORITHMES

        //IMPORTANT NOTE
        //METHODS OF THIS CLASS MUST BE CORRECTED FOR CELL COARSE/REFINE PROCEDURS
        #define DatumContainerIterator typename DatumContainer<T>::iterator
        public:
        DatumContainer( SeqType num, const T& val = T() ):std::vector<T>(num,val){};
        DatumContainer():std::vector<T>(){};
        DatumContainerIterator insert(SeqType loc, T &val);
        void erase(SeqType loc);
    };

    //Ghost container of doubles
    typedef DatumContainer<FloatType> DoubleDatumVector; //must be redefined as a class

    /*******************************************************/
    /********************DatumContainer*********************/
    /*******************************************************/
    template <class T> void DatumContainer<T>::erase(SeqType loc)
    {
        erase(DatumContainer<T>::begin() + loc);
    };
    //-------------------------------------------------------
    template <class T> DatumContainerIterator DatumContainer<T>::insert(SeqType loc, T &val)
    {
        insert(DatumContainer<T>::begin() + loc, val);
    };

}
#endif
